package com.dotndot.momserver.data;

import java.util.*;

import javax.jdo.annotations.*;

import com.google.appengine.api.datastore.*;

@PersistenceCapable( identityType = IdentityType.APPLICATION )
public class Story
{
    @PrimaryKey
    @Persistent( valueStrategy = IdGeneratorStrategy.IDENTITY )
    private Long index;

    @Persistent
    private Long userIndex;

    @Persistent
    private String content;

    @Persistent
    private Date date;

    @Persistent
    private String viewType;
    
    @Persistent
    private Blob image;

//    @Persistent
//    private Blob imageThumb;

    public Story( Long userIndex, String content, Date date, String viewType, Blob image )
    {
        setUserIndex(userIndex);
        setContent(content);
        setDate(date);
        setViewType(viewType);
        setImage(image);
//        setImageThumb(imageThumb);
    }

    public void setIndex( Long index )
    {
        this.index = index;
    }

    public Long getIndex()
    {
        return index;
    }

    public void setUserIndex( Long userIndex )
    {
        this.userIndex = userIndex;
    }

    public Long getUserIndex()
    {
        return userIndex;
    }

    public void setContent( String content )
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }

    public void setDate( Date date )
    {
        this.date = date;
    }

    public Date getDate()
    {
        return date;
    }

    public void setViewType( String viewType )
    {
        this.viewType = viewType;
    }

    public String getViewType()
    {
        return viewType;
    }
    
    public void setImage( Blob image )
    {
        this.image = image;
    }

    public Blob getImage()
    {
        return image;
    }

//    public void setImageThumb( Blob imageThumb )
//    {
//        this.imageThumb = imageThumb;
//    }
//
//    public Blob getImageThumb()
//    {
//        return imageThumb;
//    }
}
